<?php


namespace app\index\controller;
use app\index\model\User;
use think\Controller;
use think\Db;

class Demo6 extends Controller
{

    public static function info(\app\index\model\User $model){
dump($model->info());
    }


    public function get(){

        $rs = User::field(['uid','nickname','phone'])
            ->where('uid',10)
            ->find();

        dump($rs);

        $data = Db::table('eb_user')
            ->field('uid,nickname')
            ->where('uid',1)
            ->find();
        dump($data);

    }

    public function all(){
        $rs = User::all();
        dump($rs);

    }

    public function select(){
        $rs = User::where('uid','in','1,2,3')
            ->select();
        dump($rs);
    }
}